import { Controller, Get, UseGuards, Post, Body } from '@nestjs/common';
import { UserLogin } from './user.interface';
import { UserService } from './user.service';

@Controller('user')
export class UserController {
  constructor(private userService: UserService) {}

  @Get()
  findUser() {
    return 'user';
  }

  @Post('/login')
  async login(
    @Body() user: UserLogin,
  ) {
    return this.userService.login(user);
  }
}
